<template>
  <div>
    <h2>{{tableSettings.title}}</h2>
    <v-table @select="handleSelect" :data="tableData" :header="tableHeader" :settings="tableSettings" />
  </div>
</template>

<script>
import vTable from "@/ui-components/Table";
import constant from "./constant";
export default {
  name: "",
  data() {
    return {
      tableData: [],
      tableHeade: [],
      tableSettings: {}
    };
  },
  components: { vTable },
  methods: {
    handleSelect(e) {
      console.log(e);
    },
  },
  created() {
    this.tableHeader = constant.tableHeader;
    this.tableSettings = constant.tableSettings;
    for (let i = 0; i < 30; i++) {
      this.tableData.push({
        name: "王小虎111",
        department: "财务部",
        workCode: "SPT0108",
        annualLeave: 10,
        privateAffairLeave: 1,
        sickLeave: 1,
        maternityLeave: 1,
        paternityLeave: 1,
        doubleOvertime: 100,
        threeOvertime: 1000,
        totalAllowance: 12222,
        attendanceCoefficient: 12,
        signature: "王小虎"
      });
    }
  }
};
</script>
